#!/usr/bin/env python
# -*- coding: gb2312 -*-
"""
"""
import logging

class HyLog:
#
    def __init__(self, filename='log.log'):
        self.logfname = filename

        logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s %(levelname)s %(message)s',
                    filename=self.logfname,
                    filemode='w')

    def log(self, string):
        logging.debug('Debug: ' + string)
        logging.info('Info: ' + string)
        logging.warning('Warning: ' + string)



###
if __name__=="__main__":
    log = HyLog()
    log.log("Hello Logging!")

